<tr><td colspan="3" class="servHd">Reminder Detail</td></tr>
<tr>
    <td width="80">Event Name</td>
    <td class="servBodL" colspan="2">
        <?php echo $reminder['Reminder']['summary']; ?>
    </td>
</tr>
<tr>
    <td>Start Time</td>
    <td class="servBodL">
        <?php echo date('m/d/Y', strtotime($reminder['Reminder']['dtstart'])); ?>
    </td>
    <td class="servBodL">
        <?php echo '00:00'; ?>
    </td>
</tr>
<tr>
    <td>End Time</td>
    <td class="servBodL">
        <?php echo date('m/d/Y', strtotime($reminder['Reminder']['dtstart'])); ?>
    </td>
    <td class="servBodL">
        <?php echo '23:59'; ?>
    </td>
</tr>
<tr>
    <td>Description</td>
    <td class="servBodL" colspan="2">
        <?php echo 'Unpaid Amount: ' . number_format($reminder['Reminder']['unpaid'],2) . ' ' . $reminder['Reminder']['currency']; ?>
    </td>
</tr>
<!--
<tr>
    <td>Date</td>
    <td class="servBodL">
        <?php echo date('m/d/Y', strtotime($reminder['Reminder']['dtstart'])); ?>
    </td>
</tr>
-->
<tr>
    <td class="servBodL" colspan="3" style="text-align: right; padding-right: 3px">
        <?php if($reminder['Reminder']['status']==0) { 
            echo $this->Html->link('Snooze', array(
                            'controller' => 'reminders',
                            'action' => 'accepted',
                            $reminder['Reminder']['id'],
                        ), array('title' => 'Snooze', 'class' => 'accepted'));
        } ?>
        <a href="http://<?php echo $_SERVER['HTTP_HOST']; ?>/aih/ics/index.php?rid=<?php echo $reminder['Reminder']['id']; ?>" title="Download">Download</a>
    </td>
</tr>
<?php
$datePicker = "
    $(function() {
        $('a[title=\"Snooze\"]').click( function() {
            var that = $(this);
            $.getJSON('http://".$_SERVER['HTTP_HOST']."'+$(this).attr('href'), function(data) {
                if (data.success) {
                    that.parents().children('a.accepted').remove();
                } else {
                    // error
                }
            });
            return false;
        });
    });";
$this->Html->scriptBlock($datePicker, array('inline' => false));
?>